package inputDemo;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class Demo8 {
    public static void main(String[] args) throws IOException {
        try (OutputStream outputStream = new FileOutputStream("d:/test.txt")){
//            outputStream.write('H');
//            outputStream.write('e');
//            outputStream.write('l');
//            outputStream.write('l');
//            outputStream.write('o');
//            outputStream.flush();
            byte[] bytes = new byte[]{
                    (byte) 'G',(byte) 'o',(byte) 'o',(byte) 'd'
            };
            outputStream.write(bytes);
            outputStream.flush();
        }
    }
}
